home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / ksieve / scriptbuilder.h < prev   
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.9 KB  |  81 lines

  1. /*  -*- c++ -*-
  2.     ksieve/interfaces/scriptbuilder.h
  3.  
  4.     This file is part of KSieve,
  5.     the KDE internet mail/usenet news message filtering library.
  6.     Copyright (c) 2002-2003 Marc Mutz <mutz@kde.org>
  7.  
  8.     KSieve is free software; you can redistribute it and/or modify it
  9.     under the terms of the GNU General Public License, version 2, as
  10.     published by the Free Software Foundation.
  11.  
  12.     KSieve is distributed in the hope that it will be useful, but
  13.     WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.     General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  20.  
  21.     In addition, as a special exception, the copyright holders give
  22.     permission to link the code of this program with any edition of
  23.     the Qt library by Trolltech AS, Norway (or with modified versions
  24.     of Qt that use the same license as Qt), and distribute linked
  25.     combinations including the two.  You must obey the GNU General
  26.     Public License in all respects for all of the code used other than
  27.     Qt.  If you modify this file, you may extend this exception to
  28.     your version of the file, but you are not obligated to do so.  If
  29.     you do not wish to do so, delete this exception statement from
  30.     your version.
  31. */
  32.  
  33. #ifndef __KSIEVE_INTERFACES_SCRIPTBUILDER_H__
  34. #define __KSIEVE_INTERFACES_SCRIPTBUILDER_H__
  35.  
  36. class QString;
  37.  
  38. namespace KSieve {
  39.  
  40.   class Error;
  41.  
  42.   class ScriptBuilder {
  43.   public:
  44.     virtual ~ScriptBuilder() {}
  45.  
  46.     virtual void taggedArgument( const QString & tag ) = 0;
  47.     virtual void stringArgument( const QString & string, bool multiLine, const QString & embeddedHashComment ) = 0;
  48.     virtual void numberArgument( unsigned long number, char quantifier ) = 0;
  49.  
  50.     virtual void stringListArgumentStart() = 0;
  51.     virtual void stringListEntry( const QString & string, bool multiLine, const QString & embeddedHashComment ) = 0;
  52.     virtual void stringListArgumentEnd() = 0;
  53.  
  54.     virtual void commandStart( const QString & identifier ) = 0;
  55.     virtual void commandEnd() = 0;
  56.  
  57.     virtual void testStart( const QString & identifier ) = 0;
  58.     virtual void testEnd() = 0;
  59.  
  60.     virtual void testListStart() = 0;
  61.     virtual void testListEnd() = 0;
  62.  
  63.     virtual void blockStart() = 0;
  64.     virtual void blockEnd() = 0;
  65.  
  66.     /** A hash comment always includes an implicit lineFeed() at it's end. */
  67.     virtual void hashComment( const QString & comment ) = 0;
  68.     /** Bracket comments inclde explicit lineFeed()s in their content */
  69.     virtual void bracketComment( const QString & comment ) = 0;
  70.  
  71.     virtual void lineFeed() = 0;
  72.  
  73.     virtual void error( const Error & error ) = 0;
  74.  
  75.     virtual void finished() = 0;
  76.   };
  77.  
  78. } // namespace KSieve
  79.  
  80. #endif // __KSIEVE_INTERFACES_SCRIPTBUILDER_H__
  81.